/*
 *  This file is part of AionCore <aioncore.com>.
 *
 *  AionCore is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  AionCore is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with aion-unique.  If not, see <http://www.gnu.org/licenses/>.
 */
package admincommands;

import com.aionemu.gameserver.configs.administration.AdminConfig;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.utils.chathandlers.AdminCommand;

/**
 * @author CoolyT
 *
 */
 public class Help extends AdminCommand
{

	public Help()
	{
		super("help");
	}

	/**
	 * {@inheritDoc}
	 */

	@Override
	public void executeCommand(Player admin, String[] params)
	{
		if(admin.getAccessLevel() < AdminConfig.COMMAND_HELP)
		{
			PacketSendUtility.sendMessage(admin, "You dont have enough rights to execute this command");
			return;
		}
		PacketSendUtility.sendMessage(admin, " ---------------------------------");
		PacketSendUtility.sendMessage(admin, "|          AionCore HELP       |");
		PacketSendUtility.sendMessage(admin, " ---------------------------------\n");
        if (params.length == 0)
        {
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ADD) {PacketSendUtility.sendMessage(admin, "//add - adds an item to you or a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ADDSET) {PacketSendUtility.sendMessage(admin, "//addset - adds an item set to you or a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ADDDROP) {PacketSendUtility.sendMessage(admin, "//adddrop - adds an drop to an npc");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ADDSKILL) {PacketSendUtility.sendMessage(admin, "//addskill - adds an skill to the target");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ADDTITLE) {PacketSendUtility.sendMessage(admin, "//addtitle - adds an title to the target");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_AI) {PacketSendUtility.sendMessage(admin, "//ai - manages the ai of an npc");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ANNOUNCE) {PacketSendUtility.sendMessage(admin, "//announce - used to make a server announce");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ANNOUNCE_FACTION) {PacketSendUtility.sendMessage(admin, "//announce_faction - used to make a server announce for one faction");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ANNOUNCEMENTS) {PacketSendUtility.sendMessage(admin, "//announcements - used to configure the auto announcments");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_APPEARANCE) {PacketSendUtility.sendMessage(admin, "//appearance - modifies the appearance of a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ASMOS) {PacketSendUtility.sendMessage(admin, "//asmos - global channel to asmodians");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_BAN) {PacketSendUtility.sendMessage(admin, "//ban - bans a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_BK) {PacketSendUtility.sendMessage(admin, "//bk - handles position bookmarks");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_CONFIGURE) {PacketSendUtility.sendMessage(admin, "//configure - let you configure server inviroments");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_DELETESPAWN) {PacketSendUtility.sendMessage(admin, "//deletespawn - removes a target from spawnlist");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_DYE) {PacketSendUtility.sendMessage(admin, "//dye - used to dye a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ELYOS) {PacketSendUtility.sendMessage(admin, "//elyos - global channel to elyos");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ENCHANT) {PacketSendUtility.sendMessage(admin, "//enchant - enchants an item");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ENEMY) {PacketSendUtility.sendMessage(admin, "//enemy - don't exactly know");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_GAG) {PacketSendUtility.sendMessage(admin, "//gag - to mute a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_GODSTONE) {PacketSendUtility.sendMessage(admin, "//godstone - sets the sucess rate for godstones");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_GOTO) {PacketSendUtility.sendMessage(admin, "//goto - ports you to definated points");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_GIVEMISSINGSKILLS) {PacketSendUtility.sendMessage(admin, "//givemissingskills - checks for missing skills and add them to target");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_GROUPTOME) {PacketSendUtility.sendMessage(admin, "//grouptome - ports a whole group to your position");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_GMLIST) {PacketSendUtility.sendMessage(admin, "//gmlist - shows a list of online GMs ADMINs and tGMs");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_HEAL) {PacketSendUtility.sendMessage(admin, "//heal - restores mp and tp of the selected target");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_HELP) {PacketSendUtility.sendMessage(admin, "//help - to show this help ..");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_INFO) {PacketSendUtility.sendMessage(admin, "//info - displays info about the selected NPC");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_INVIS) {PacketSendUtility.sendMessage(admin, "//invis - makes you invisible");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_INVUL) {PacketSendUtility.sendMessage(admin, "//invul - makes you invulernable");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_KICK) {PacketSendUtility.sendMessage(admin, "//kick - kicks a player from server");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_KILL) {PacketSendUtility.sendMessage(admin, "//kill - kills the selected target instantly");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_KINAH) {PacketSendUtility.sendMessage(admin, "//kinah - adds kinah to a target");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_LEGION) {PacketSendUtility.sendMessage(admin, "//legion - let you manage legions");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_LOC) {PacketSendUtility.sendMessage(admin, "//loc - displays your current location");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_MORPH) {PacketSendUtility.sendMessage(admin, "//morph - let you look like an NPC");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_MOVEPLAYERTOPLAYER) {PacketSendUtility.sendMessage(admin, "//moveplayertoplayer - telports a player to another players position");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_MOVETO) {PacketSendUtility.sendMessage(admin, "//moveto - teleports you to defined coordinates");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_MOVETOME) {PacketSendUtility.sendMessage(admin, "//movetome - teleports an player to your position");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_MOVETONPC) {PacketSendUtility.sendMessage(admin, "//movetonpc - teports you to an NPC");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_MOVETOPLAYER) {PacketSendUtility.sendMessage(admin, "//movetoplayer - teleports you to players position");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_MOVIE) {PacketSendUtility.sendMessage(admin, "//movie - shows AionMovies by id");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_NEUTRAL) {PacketSendUtility.sendMessage(admin, "//neutral - sets you NEUTRAL");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_NOTICE) {PacketSendUtility.sendMessage(admin, "//notice - displays a server-wide notice");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_PETITION) {PacketSendUtility.sendMessage(admin, "//petition - lists petitions");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_PLAYERINFO) {PacketSendUtility.sendMessage(admin, "//playerinfo - gives you information about a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_PROMOTE) {PacketSendUtility.sendMessage(admin, "//promote - changes accesslevel or membership of a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_QUESTCOMMAND) {PacketSendUtility.sendMessage(admin, "//quest - starts or sets a quest for target");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_RELOAD) {PacketSendUtility.sendMessage(admin, "//reload - reload command");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_RELOADSPAWNS) {PacketSendUtility.sendMessage(admin, "//reloadspawns - reloads spawns from file");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_REMOVE) {PacketSendUtility.sendMessage(admin, "//remove - allow remove an item from player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_REVOKE) {PacketSendUtility.sendMessage(admin, "//revoke - takes given rights away from target");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SAVESPAWNDATA) {PacketSendUtility.sendMessage(admin, "//savespawndata - saves added spawns into a file");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SAY) {PacketSendUtility.sendMessage(admin, "//say - let a target speak :P");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SETAP) {PacketSendUtility.sendMessage(admin, "//set ap - sets AP for a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SETCLASS) {PacketSendUtility.sendMessage(admin, "//set class - changes class of a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SETEXP) {PacketSendUtility.sendMessage(admin, "//set exp - sets EXP for a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SETLEVEL) {PacketSendUtility.sendMessage(admin, "//set level - sets level for a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SETTITLE) {PacketSendUtility.sendMessage(admin, "//set title - sets title for a player");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SIEGE) {PacketSendUtility.sendMessage(admin, "//siege - manages siege");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SPAWNNPC) {PacketSendUtility.sendMessage(admin, "//spawnnpc - spawns an NPC on your position");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SPEED) {PacketSendUtility.sendMessage(admin, "//speed - increases your run and fly speed");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_SYSTEM) {PacketSendUtility.sendMessage(admin, "//system - manages system (shutdown, restart, etc..)");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_TIME) {PacketSendUtility.sendMessage(admin, "//time - sets daytime");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_UNSTUCK) {PacketSendUtility.sendMessage(admin, "//unstuck - ports you to last binding point");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_WEATHER) {PacketSendUtility.sendMessage(admin, "//weather - changes the current weather");}
		if(admin.getAccessLevel() >= AdminConfig.COMMAND_ZONE) {PacketSendUtility.sendMessage(admin, "//zone - displays zone information");}

		PacketSendUtility.sendMessage(admin, " ---------------------------------\n");
		PacketSendUtility.sendMessage(admin, "to get more information about an command try //help [command] (eg. //help goto) ");

		}
		else
		{

			if (params[0].equalsIgnoreCase("goto"))
			{
				PacketSendUtility.sendMessage(admin, "teleport youself to specified place name\nexample: //goto poeta\n\nLIST OF DEFINITION NAMES\n\npoeta\nverteron\neltnem\ntheobomos\nheiron\nsanctum\nishalgen\naltgard\nmorheim\nbrusthonin\nbeluslan\npandaemonium\nabyss1 <- Latis Plazza bottom Elyos\nabyss2 <- Russet Plazza bottom Asmodians\nabyss3 <- Top Asmodians\nabyss4 <- Top Elyos\n\n<- Core Fortress\nsenza\nkaramatis1\nkaramatis2\n\naerdina\ngerania\nlepharist <- Lerpharist Secret Labratory\nfragment <- Fragment of Darkness\nsanctumarena <- Sanctum Underground Arena\nidratu <- Indratu Fortress\nazoturan <- Azoturan Fortress\nataxiar1 <- Narsass 1\nataxiar2 <- Narsass 2\nbregirun\nnidalber\nskytemple <- Sky Temple of Arkanis\nspace <- Space of Destiny\ntrinielarena <- Triniel Underground Arena\nfiretemple\nreshanta\nprison1 <- Prison Elyos\nprison2 <- Prison Asmodian\ntest1 <- Giant Monster\ntest2 <- Test Basic\ntest3 <- Test Server\n");
				return;
			}

			if (params[0].equalsIgnoreCase("set"))
			{
				PacketSendUtility.sendMessage(admin, "syntax //set <class|exp|ap|level|title> (you must choose a target before)\n\n//set class - Set target player class\n\npossible id's:\nWarrior - 0\nGladiator - 1\nTemplar - 2\nScout - 3\nAssassin - 4\nRanger - 5\nMage - 6\nSorcerer - 7\nSpirit Master - 8\nPriest - 9\nCleric - 10\nChanter - 11\n\n//set exp - sets exp for the target\n//set ap - sets AP for the target\n//set level - sets level for the target\n//set title - sets title for a target\n");
				return;
			}

			if (params[0].equalsIgnoreCase("dye"))
			{
				PacketSendUtility.sendMessage(admin, "syntax //dye [color] (you must choose a target before)\n\na few color codes:\n\n[Color] 	- [HEX]\nTurquoise 	- 198d94\nBlue 		- 1f87f5 \nBrown 		- 66250e \nPurple 		- c38df5 \nred 		- c22626 \nwhite 		- ffffff \nblack 		- 000000 \nhot orange 	- e36b00 \nrich purple - 440b9a \nhot pink 	- d60b7e \nmustard 	- fcd251 \ngreen tea 	- 61bb4f \nolive green - 5f730e \ndeep blue 	- 14398b \npurple 		- 80185d \nwiki 		- 85e831 \nomblic 		- ff5151 \nmeon 		- afaf26 \normea 		- ffaa11 \ntange 		- bd5fff \nervio 		- 3bb7fe \nlunime 		- c7af27 \nvinna 		- 052775 \nkirka 		- ca84ff \nbrommel 	- c7af27 \npressa 		- ff9d29 \nmerone 		- 8df598\nkukar 		- ffff96\nleopis 		- 31dfff\nsyntax : //dye no - resets dye\n");
				return;
			}

		PacketSendUtility.sendMessage(admin, "Sorry there is no help aviable for this command\n");

		}

	}

}

